﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;

namespace Kinect.Tests
{
    public static class StickyButtonHandler
    {
        //new button to avoid null checks
        private static KinectButtonBase Focused;

        //set focused sticky button
        public static void Focus(KinectButtonBase button)
        {
            Focused = button;
        }

        //invoke click
        public static void Click()
        {
            if (Focused != null)
            {
                Focused.RaiseEvent(new RoutedEventArgs(KinectButtonBase.ClickEvent));
            }
        }
    }
}
